home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pct1-b.zip / INTRO1.DOC < prev    next >
Text File  |  1990-08-13  |  18KB  |  384 lines

  1.  
  2.  
  3.  
  4.                                                                              1
  5.  
  6.              Hi!
  7.  
  8.              Welcome to "The PC Assembler Helper" and "The PC Assembler
  9.              Tutor". Both the program and the tutorial are designed to help
  10.              those who are just starting to learn assembler language as well
  11.              as those who know some assembler instructions but want to have a
  12.              firmer grasp of the complete instruction set for the 8086.
  13.  
  14.              There are two significant problems to learning assembler
  15.              language. First, it is difficult to do either input or output at
  16.              the assembler level. Imagine trying to learn BASIC if you were
  17.              not allowed the following two instructions:
  18.  
  19.                  PRINT   RESULT
  20.                  INPUT   NEW.DATA
  21.  
  22.              Without PRINT and INPUT, you might be able to write a program but
  23.              you would not be able to see the results. You would never be sure
  24.              that the results were what you wanted. Also, you would not be
  25.              able to vary the data. It would have to be coded into the
  26.              program.
  27.  
  28.              "The PC Assembler Helper" has taken care of this problem. It
  29.              provides input and output of all standard 8086/8087 integral data
  30.              types. These include 1 byte, 2 byte, 4 byte and 8 byte signed and
  31.              unsigned numbers along with 1 byte and 2 byte hex, ASCII and
  32.              binary data. Lastly, there is i/o for 10 byte BCD numbers. The
  33.              interface has been designed so that beginners can use it with a
  34.              minimum of trouble.
  35.  
  36.              The second major problem is that most assembler books regard the
  37.              8086 as a black box. There is no way of seeing the workings of
  38.              the chip itself. What exactly happens when you add two numbers?
  39.              What about multiplication?
  40.  
  41.              Once again, "The PC Assembler Helper" has come up with the
  42.              solution. It allows you to view all the registers and flags at
  43.              will. These registers can be independently formatted. If one
  44.              register holds ASCII data while another has binary information
  45.              and yet a third has a signed number, then each register can be
  46.              set to display the appropriate type of data. This, you will find,
  47.              is invaluable. 
  48.  
  49.              A third, though less important problem, is assembler overhead.
  50.              There is a certain structure that must be followed to get the
  51.              program to assemble and run correctly. This has been provided in
  52.              template files. All you need to do is copy the appropriate
  53.              template file and put the code in a predefined location to get
  54.              your program to run correctly. For simple programs this can cut
  55.              your work in half. It also minimizes the number of typos.
  56.  
  57.              "The PC Assembler Tutor" is built around the Helper. It
  58.              systematically goes through the 8086 instruction set, having you
  59.              write small programs to illustrate how each instruction works. At
  60.  
  61.              ______________________
  62.  
  63.              The PC Assembler Tutor - Copyright (C) 1989 Chuck Nelson
  64.  
  65.  
  66.  
  67.  
  68.              The PC Assembler Tutor                                          2
  69.              ______________________
  70.  
  71.              the end you should have a feeling for all the instructions except
  72.              a few which involve the 8087 or peripheral hardware. These will
  73.              be mentioned, but not used. 
  74.  
  75.              You will be a better programmer if you know how all the
  76.              instructions work. There are times when one specific instruction
  77.              is just what you want. If you don't know that it exists or how it
  78.              works, you won't use it. This way, if you run across a situation
  79.              where you think that a certain instruction might be useful to
  80.              you, you can go back to the Tutor to refresh your memory and be
  81.              able to put the instruction to use almost immediately. 
  82.  
  83.              If you are a beginner, I feel confident that you will learn
  84.              faster and more thoroughly than with any other method. If you
  85.              know some assembler but would like to know more, I'm sure that
  86.              there is lots that would interest you.
  87.  
  88.                  AAD
  89.                  SBB
  90.                  XLAT
  91.                  REPNE
  92.                  SCAS
  93.  
  94.              Do you know what these are? What about segment overrides? Do you
  95.              know when to use them and when to avoid them? Do you know ALL the
  96.              allowable addressing modes? What actually is an ASSUME statement?
  97.  
  98.              In order to let you see if you find the material interesting, you
  99.              may go through chapters 0 - 4 chapters without any obligation.
  100.              You may also make an archival copy of the disks (you are urged to
  101.              do so). If you continue after the fourth chapter then please
  102.              register by sending $9.95 (or $10.60 for Californians) to
  103.              Nelsoft. The registration form is at the end of this
  104.              introduction.
  105.  
  106.              If I followed the pricing structure of other people I would be
  107.              charging several times as much. My goal is different. I want
  108.              everyone who can benefit from the program and tutorial to use
  109.              them, and I want everyone who uses them to do so legally.
  110.              Therefore, I have priced them so that everyone can pay for them
  111.              without any inconvenience. If you use them, you can certainly
  112.              afford my minimal price. 
  113.  
  114.              The material is sequential. Chapter 0 should be read before
  115.              starting on the other chapters and the chapters should be read in
  116.              order. Appendix 1 contains all the subroutine calls in "The
  117.              Assembler Helper" and how to access them. Appendix 2 is an
  118.              alphabetical list of all the 8086 instructions, telling what they
  119.              do and showing all allowable syntaxes. Appendix 3 gives the speed
  120.              of all instructions along with a list of which flags are affected
  121.              (you will learn what this means in the Tutor).
  122.  
  123.              It is to your benefit to start at the beginning and work your way
  124.              through. Chapter 0 contains material that you need to know, so
  125.              you must read it. The text has been broken up into sections so
  126.              that no printout is longer than 10 pages or so. All text files
  127.              have a file extension .DOC. If a chapter is much longer than
  128.  
  129.  
  130.  
  131.  
  132.              Introduction                                                    3
  133.              ____________
  134.  
  135.              that, it will be divided into parts, indicated by -1, -2, -3
  136.              after the chapter number. These files should be printable with
  137.              the DOS 'print' command. The only imbedded printer command code
  138.              is form feed for the next page. The text runs about 2500
  139.              characters a page, so you can estimate the size of the printout
  140.              from the size of the text file.
  141.  
  142.              Curly brackets in the text denote a footnote.{1}  Some of the
  143.              footnotes are technical and will be understood by only a quarter
  144.              of the people. If you are one of that quarter, fine. If not, the
  145.              important thing is not that you understand the outline of the
  146.              proof, but that you believe that what is being proved is true. 
  147.  
  148.              The assembler level is for those who have some degree of
  149.              intellegence. You have an unparalleled opportunity to screw
  150.              things up at this level. If you got Cs and Ds in high school
  151.              algebra because you didn't quite understand what was going on,
  152.              then you probably shouldn't do assembler programming.{2}
  153.  
  154.              In addition, I assume that you have done a lot of programming,
  155.              preferably in either Pascal or C. BASIC is a nice language, but
  156.              it is missing a certain type of structure which is vital for
  157.              creating robust code in assembler language. If BASIC is all you
  158.              know, I would recommend that you learn C first and then come back
  159.              to assembler. You will be a better programmer for it.{3}
  160.  
  161.              Finally, "The Assembler Helper" assumes that it has control of
  162.              the screen. If you are hooked up to a debugger, there may be a
  163.              conflict. There is a subroutine in the Helper called "set_timer"
  164.              which may help minimize this conflict. You need to be in chapter
  165.              5 or so before you will be able to use it. See \APPENDIX\APP1.DOC
  166.              for details.
  167.  
  168.              If you are ready to go, please look at the following two pages
  169.              and then read INTRO2.DOC. It will explain a little about what an
  170.              assembler is. I hope you enjoy using the Helper and the Tutor as
  171.              much as I enjoyed writing them.
  172.  
  173.  
  174.              Chuck Nelson
  175.  
  176.  
  177.  
  178.  
  179.              ____________________
  180.  
  181.                 1. Like this one.
  182.  
  183.                 2. If you got Cs and Ds because you were too busy reading
  184.              "Tales from the Crypt" and Isaac Asimov, that's something
  185.              entirely different. 
  186.  
  187.                 3. On re-reading this I decided that it is true, but
  188.              pretensious. If you like BASIC and program well in BASIC, then
  189.              you should learn assembler and continue using BASIC. There are
  190.              certain inherent difficulties with BASIC, so before you start you
  191.              should read BAS1.DOC. This is on DISK2.
  192.  
  193.  
  194.  
  195.  
  196.              The PC Assembler Tutor                                          4
  197.              ______________________
  198.  
  199.  
  200.  
  201.              The PC Assembler Tutor - Copyright (C) 1989 Chuck Nelson
  202.                                      All rights reserved
  203.  
  204.  
  205.              Microsoft (R) Macro Assembler and Microsoft (R) Overlay Linker
  206.              are registered trademarks of Microsoft Corporation. 
  207.  
  208.              This manual contains screen output of the Macro Assembler and the
  209.              Overlay Linker. Screen shots (C) 1981-1988 Microsoft Corporation.
  210.  
  211.              It also contains excerpts from Macro Assembler .LST files and
  212.              Overlay Linker .MAP files. Portions of these files are Copyright
  213.              (C) 1981-1988 Microsoft Corporation. 
  214.  
  215.              Used with permission of Microsoft Corporation.
  216.  
  217.  
  218.  
  219.                            TRADEMARK ACKNOWLEDGEMENT
  220.  
  221.              IBM is a registered trademark of International Business Machines
  222.                  Inc.
  223.              Intel is a registered trademark of Intel Corporation.
  224.              Macintosh is a registered trademark of Apple Computer, Inc.
  225.              Microsoft is a registered trademark of Microsoft Corporation.
  226.              Motorola is a registered trademark of Motorola, Inc.
  227.              8086 is a trademark of Intel Corporation.
  228.              Codeview is a registered trademark of Microsoft Corporation.
  229.              QuickC is a registered trademark of Microsoft Corporation.
  230.              Turbo Pascal, Turbo Assembler and Turbo Debugger are registered
  231.                  trademarks of Borland International.
  232.  
  233.  
  234.  
  235.  
  236.              The PC Assembler Helper was designed as a learning tool. It is
  237.              meant to be used in conjunction with simple assembler programs to
  238.              display the results of individual assembler instructions. It
  239.              should not be used with high-level languages nor with programs
  240.              that modify the screen.
  241.  
  242.              HELPMEM.COM, the memory resident version, uses the same
  243.              interrupts as a debugger. Therefore, if there is a debugger
  244.              attatched to any program that is being used, HELPMEM.COM should
  245.              not be loaded into memory.
  246.  
  247.  
  248.                                    WARRANTY
  249.  
  250.              THIS PROGRAM, INSTRUCTION MANUAL, AND REFERENCE MATERIALS ARE
  251.              SOLD "AS IS", WITHOUT WARRANTY AS TO THEIR PERFORMANCE,
  252.              MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE
  253.              ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF THESE PROGRAMS
  254.              IS ASSUMED BY YOU.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.           *****************************************************************
  264.                                      REGISTRATION
  265.  
  266.           Hey, Chuck, I'm no chump!
  267.  
  268.           I'm using your programs/manual, and I want to pay my fair share.
  269.           Please make me a registered user of "The PC Assembler Tutor" and
  270.           "The PC Assembler Helper". Enclosed is a check for $9.95 (plus
  271.           6.5% tax or $10.60 for California residents). Say, that's cheaper
  272.           than a large pizza!
  273.  
  274.  
  275.           Name_________________________________________________________
  276.                       Last                First               Initial
  277.  
  278.           Address______________________________________________________
  279.                       Street Address
  280.  
  281.                    _______________________________________________________
  282.                       City, State, and Zip Code
  283.  
  284.           I got my copy from ___________________________________________
  285.  
  286.           Make checks payable to NELSOFT and send your registration to:
  287.  
  288.                  NELSOFT
  289.                  P.O. Box 21389
  290.                  Oakland, CA  94620
  291.  
  292.           ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  293.                              REGISTRATION BENEFITS
  294.            
  295.           As a registered user of "The PC Assembler Helper" and "The PC
  296.           Assembler Tutor" you are entitled to:
  297.  
  298.           1) Use asmhelp.obj and helpmem.com for personal use.
  299.           2) Make 1 (one) printer copy of "The PC Assembler Tutor".
  300.           3) Use all programs in "The PC Assembler Tutor" for personal use.
  301.           4) Make an archival copy of the disks.
  302.           5) Distribute UNALTERED disks to friends for their perusal.
  303.           6) Use any updates to either "The PC Assembler Helper" or "The PC
  304.              Assembler Tutor" under the same registration conditions.
  305.  
  306.           Though copies of the disk may be given away if there is no
  307.           charge, it is illegal to charge for redistribution of the disk or
  308.           its contents without permission of the author. Under no
  309.           circumstances may you distribute printed copies of "The PC
  310.           Assembler Tutor". If you intend to charge for distributing the
  311.           disk or its information, please read and sign the following
  312.           distribution agreement.
  313.  
  314.           *****************************************************************
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.                         DISTRIBUTION LICENSING AGREEMENT FOR
  323.                             THE PC ASSEMBLER HELPER AND
  324.                                THE PC ASSEMBLER TUTOR
  325.  
  326.  
  327.           Anyone wishing to charge people a fee for giving them a copy of
  328.           The PC Assembler Helper and/or The PC Assembler Tutor must have
  329.           the written authorization of the author, without which the
  330.           distributor is guilty of copyright violation. To receive such
  331.           authorization, send this completed application, along with a copy
  332.           of your software library's order form to:
  333.  
  334.                 NELSOFT
  335.                 P.O. Box 21389
  336.                 Oakland, CA  94620
  337.  
  338.           If you want a distribution disk with the latest copy of these
  339.           programs, please include $7.00 to cover the cost of the disks,
  340.           mailing and handling. (This offer is for bona fide user groups
  341.           and shareware distributors only).
  342.  
  343.  
  344.           NAME OF ORGANIZATION ___________________________________________
  345.  
  346.           YOUR NAME ______________________________________________________
  347.  
  348.           ADDRESS ________________________________________________________
  349.  
  350.           CITY, STATE ____________________________________________________
  351.  
  352.  
  353.                                TERMS OF DISTRIBUTION
  354.  
  355.              1. The fee charged for each disk may not exceed $7.00. On
  356.              high-density disks, the fee may not be over $10.00.
  357.  
  358.              2. Your library's catalog or listing must state that this
  359.              material is not free, but is copyrighted material that is
  360.              provided to allow the user to evaluate it before paying.
  361.  
  362.              3. The offering and sale of disks containing The PC Assembler
  363.              Helper and The PC Assembler Tutor will be stopped at any time
  364.              the author so requests.
  365.  
  366.              4. The Tutor and the Helper must be distributed together. The
  367.              compressed files and the information document must remain in
  368.              the subdirectory \PCTUTOR. There may be no additional files in
  369.              this subdirectory. Both the name and the contents of
  370.              \PCREADME.DOC must remain unaltered.
  371.  
  372.              5. Problems or complaints will be reported to the author.
  373.  
  374.           In return for the right to charge a fee for the distribution of
  375.           The PC Assembler Helper and The PC Assembler Tutor, I agree to
  376.           comply with the above terms of distribution. 
  377.  
  378.           Signed,
  379.  
  380.  
  381.           __________________________________________    __________________
  382.                       Your Signature                           Date
  383.  
  384.